package cn.zwxky.android.staff.Jurisdiction.Marketplace;

import android.content.Intent;
import android.view.View;

import com.zgscwjm.lsfbbasetemplate.LsfbActivity;
import com.zgscwjm.lsfbbasetemplate.annotation.ContentView;
import com.zgscwjm.lsfbbasetemplate.annotation.OnClick;

import cn.zwxky.android.staff.Jurisdiction.Furlough.ManageLeaveActivity;
import cn.zwxky.android.staff.Jurisdiction.Operate.OperateTaskApproveActivity;
import cn.zwxky.android.staff.R;
import cn.zwxky.android.staff.Utils.LittleUtils;

/**
 * 市场部页面
 * Created by Administrator on 2017/3/30 0030.
 */
@ContentView(R.layout.aty_arketplace_manage)
public class MarketplaceManageActivity extends LsfbActivity {
    @Override
    public void initView() {
        LittleUtils.setsimpletitlebar(this, "管理权限");
    }

    @Override
    public void initEvent() {

    }

    /**
     * 点击事件
     *
     * @param view
     */
    @OnClick({R.id.fg_approve_leave, R.id.fg_approve_task})
    public void onClick(View view) {
        switch (view.getId()) {
            //请假审批
            case R.id.fg_approve_leave:
                startActivity(new Intent(this, ManageLeaveActivity.class));
                break;
            //业务审批
            case R.id.fg_approve_task:

                if (LittleUtils.nodel.equals("1")|| LittleUtils.depart.equals("5")) {
                    //总经理 总经理
                    startActivity(new Intent(this, TaskApproveActivity.class));
                } else {
                    if (LittleUtils.depart.equals("1") || LittleUtils.depart.equals("2")) {
                        //市场部 技术部
                        startActivity(new Intent(this, TaskApproveActivity.class));
                    } else if (LittleUtils.depart.equals("3")) {
                        //经营部
                        startActivity(new Intent(this, OperateTaskApproveActivity.class));
                    }
                }
                break;
        }
    }


    @Override
    public void initData() {

    }
}
